package cn.com.bluemoon.daps.common.validation.datasource;

import cn.com.bluemoon.daps.common.validation.illegal.IllegalChar;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.Arrays;
import java.util.List;

public class EnvironmentCheck implements ConstraintValidator<IllegalNumber,Integer> {


    @Override
    public boolean isValid(Integer charSequence, ConstraintValidatorContext constraintValidatorContext) {

        List<Integer> integers = Arrays.asList(1, 2, 3, 4);
        if(integers.contains(charSequence)){
            return true;
        }
        return false;
    }
}
